import os, sys

from flask import Flask

from apps.config.setting import SERVER_PORT
from apps.controller.UserController import user_bp  # 假设 UserController 改为蓝图
from apps.controller.CommonController import common_bp

app = Flask(__name__)
app.register_blueprint(user_bp)
app.register_blueprint(common_bp)


@app.route('/')
def index():
    return "hello world"


if __name__ == '__main__':
    # host为主机ip地址，port指定访问端口号，debug=True设置调试模式打开
    app.run(host="0.0.0.0", port=SERVER_PORT, debug=True)
